package com.kangfu.api.controller;

import com.kangfu.api.service.IDoctorService;
import com.kangfu.common.model.AjaxResult;
import com.kangfu.db.model.vo.DoctorVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/doctor")
public class DoctorController {

    @Autowired
    public IDoctorService doctorService;

    @GetMapping("/list")
    public AjaxResult getDoctorList() {
        List<DoctorVo> list = doctorService.selectUserList();

        return AjaxResult.success(list);
    }

}
